<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.global.js"></script>
    <style>
        .box1{
            background-color: red;
            border: 1px solid black;
        }

        .box2{
            width: 100px;
            height: 100px;
            color: green;
        }
    </style>
</head>
<body>
<div id = 'app'>
    <div :class="myClass">aaaa</div>
    <br>
    <div :class="myClass2">bbb</div>
    <br>
    <div :class="myClass3">ccc</div>
</div>
<script>
    const app = Vue.createApp({
        data() {
            return {
                myClass: 'box1 box2',
                myClass2: ['box1' ,'box2'],
                myClass3: {box1:true ,box2:true},
            }
        },
    });
    let vm = app.mount('#app');

    setTimeout(()=>{
        //移除box2
        vm.myClass2.pop()

        //移除box1
        vm.myClass3.box1 = false;
    },2000)

</script>
</body>
</html>